<?php
namespace app\admin\controller;

use think\Loader;
use think\Db;
use app\common\tools\jsonRPCClient;

/**
* 用户管理
* @author aierui github  https://github.com/Aierui
* @version 1.0 
*/
class Notice extends Admin
{

	function _initialize()
    {
        parent::_initialize();
    }


    //商城
    public function index(){
        //获取用户的当前语言环境
        $notice = Db::name('notice')->order('id desc')->select();
        
        $this->assign('notice',$notice);
        

        return view();
    }

    public function detail()
    {
        if($this->request->isGet())
        {
            $data = $this->request->get();

            $notice = Db::name('notice')->where('id',$data['id'])->find();
            if($notice)
            {
                $this->assign('v',$notice);
            }else
            {
                $this->redirect('index.html');
            }
            
        }
        return view();
    }




}